/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package battleship_client;

import java.io.BufferedReader;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author jalejandrovc
 */
public class PingThread extends Thread {

    private BufferedReader in;
    private boolean pong = false;

    public PingThread(BufferedReader in) {
        this.in = in;
    }

    public boolean getPong(){
        return pong;
    }

    public void run() {
        try {
            pong = in.readLine().equals("pong");
        } catch (IOException ex) {
            Logger.getLogger(FilterManager.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
